
import java.util.Scanner;
public class hello {
    public static void main(String[] args) {
        int a1 = 15;
        int b2 = 15;
        int c3 = 0;
        System.out.println("a1+b2="+(a1+b2));
        System.out.println("a1-b2="+(a1-b2));
        System.out.println("a1*b2="+(a1*b2));
        System.out.println("a1/b2="+(a1/b2));
        System.out.println("a1==b2返回的值"+(a1==b2));
        System.out.println("a1!=b2返回的值"+(a1!=b2));
//        逻辑运算符 与&& 或|| 非!
        boolean o1 = true;
        boolean o2 = false;
        System.out.println("o1&&o2返回的值"+(o1&&o2));
        System.out.println("o1||o2返回的值"+(o1||o2));
        System.out.println("!o1返回的值"+(!o1));
        System.out.println("o1&&!o2返回的值"+(o1&&!o2));



//      创建对象录入对象
        Scanner sc= new Scanner(System.in);
//      通过对象获取数值
        System.out.println("请输入数据,获取百位和十位和个位");
        int x = sc.nextInt();
//        获取个位数
        int a = x % 10;
//        获取十位数
        int b = x /10 %10;
//        获取百位数
        int c = x /100 % 10;
        System.out.println(x+"的是");
        System.out.println("百位数是"+c);
        System.out.println("十位数是"+b);
        System.out.println("个位数是"+a);


    }
}
